package work;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @auther Macrydy
 * @date 2020/7/16 18:49
 */
public class TcpThreadServer {
    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket(10111);

        while (true) {
            Socket accept = ss.accept();
            TcpServer tcpServer = new TcpServer(accept);
            new Thread(tcpServer).start();
        }
    }
}
